package com.healthcloud.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.healthcloud.utils.DateUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author zhangjie
 */
@Data
@ApiModel("积分详情")
public class IntegralDetail {

    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty(value = "master_id")
    private Integer masterId;

    @ApiModelProperty(value = "操作方向（0-新增，1-提取）")
    private Integer operationDirection;

    @ApiModelProperty(value = "描述")
    private String msg;

    @ApiModelProperty(value = "sn")
    private String sn;

    @ApiModelProperty(value = "积分数")
    private Integer score;

    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "时间")
    private Date createTime;

    private String date;

    public String getDate(){
        return DateUtils.format(createTime, "yyyy-MM");
    }
}
